using Microsoft.Data.Sqlite;

namespace WordApp
{
    internal static class Program
    {
        /// <summary>
        ///  The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            initializeDB();
            ApplicationConfiguration.Initialize();
            Application.Run(new Form1());
        }

        static void initializeDB()
        {
            var connString = "Data Source=word.db";
            using (var connection = new SqliteConnection(connString))
            {
                connection.Open();

                var createCMD = connection.CreateCommand();
                createCMD.CommandText = @"CREATE TABLE IF NOT EXISTS words( 
                                          English TEXT NOT NULL, Chinese TEXT NOT NULL)";
                createCMD.ExecuteNonQuery();
            }
        }
    }
}